<extend name="Common/panel-block"/>
<block name="body">
    <form action="{:U()}" method="post" class="layui-form layui-clear" ajaxSubmit>
        <div class="layui-col-lg8">
            <icy8:formItem label="模型标识" help="创建后为数据表名">
                <input name="name" class="layui-input" placeholder="模型标识" value="{$info.name}"/>
            </icy8:formItem>
            <icy8:formItem label="模型名称">
                <input name="title" class="layui-input" placeholder="模型名称" value="{$info.title}"/>
            </icy8:formItem>
            <icy8:formItem label="数据库引擎">
                <php> $engine_type = C('DATABASE_ENGINE_TYPE')</php>
                <Html:select name="engine_type" options="engine_type" selected="info['engine_type']" />
            </icy8:formItem>
            <icy8:formItem label="模型主键" help="留空则不创建主键">
                <input name="primary_key" class="layui-input" placeholder="模型主键" value="{$info.primary_key|default='id'}"/>
            </icy8:formItem>
            <icy8:formItem label="列表模版" help="留空使用默认模版">
                <input name="template_list" class="layui-input" placeholder="列表模版" value="{$info.template_list}"/>
            </icy8:formItem>
            <icy8:formItem label="新增模版" help="留空使用默认模版">
                <input name="template_add" class="layui-input" placeholder="新增模版" value="{$info.template_add}"/>
            </icy8:formItem>
            <icy8:formItem label="编辑模版" help="留空使用默认模版">
                <input name="template_edit" class="layui-input" placeholder="编辑模版" value="{$info.template_edit}"/>
            </icy8:formItem>
            <icy8:formItem label="搜索字段" help="数据列表中供搜索用的字段名，多个字段用“,”号隔开">
                <input name="search_field" class="layui-input" placeholder="搜索字段" value="{$info.search_field}"/>
            </icy8:formItem>
            <icy8:formItem label="列表定义" help="默认列表模板的展示规则">
                <textarea name="list_grid" class="layui-textarea" placeholder="列表定义">{$info.list_grid}</textarea>
            </icy8:formItem>
            <icy8:formItem label="">
                <input type="hidden" name="id" value="{$info.id}"/>
                <icy8:button title="保存"/>
                <icy8:button title="返回" click="window.history.go(-1);" btnType="primary" type="button"/>
            </icy8:formItem>
        </div>
    </form>
</block>
<block name="mod_script">
    //layui.common.addWindow($('#test'), parent.layui.element);
</block>